package com.learn

object lesson03 {
  def main(args: Array[String]): Unit = {
    //定义两个Int类型的变量a和b, 初始化值分别为10和20
    var a = 10
    var b = 20
    //定义临时变量temp, 记录变量a的值
    var temp = a			//a = 10, b = 20, temp = 10
    //把变量b的值赋值给a
    a = b					//a = 20, b = 20, temp = 10
    //把临时变量temp的值赋值给b
    b = temp				//a = 20, b = 10, temp = 10
    //打印结果
    println("a: " + a)		//a: 20
    println("b: " + b)		//b: 10
  }
}
